package com.ac.input.util;

import java.util.Comparator;

import com.ac.input.dm.HndInpDefItm;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright AgileCentury 2004</p>
 * <p>Company: AgileCentury</p>
 * @author <a href="mailto:lianzs@tom.com">Lianzs</a>
 * @version 1.0
 */

public class CompareViews implements Comparator {
    public int compare(Object o1, Object o2) {
        HndInpDefItm dm1 = (HndInpDefItm) o1;
        HndInpDefItm dm2 = (HndInpDefItm) o2;
        int flag;
        int comp1 = dm1.getVisNo().intValue();
        int comp2 = dm2.getVisNo().intValue();
        if (comp1 > comp2) {
            flag = 1;
        } else {
            flag = -1;
        }
        return flag;
    }
}
